package com.njbdqn.ALi.zjg.dao;

import org.njbdqn.ali.database.SqlTemplate;

public class TotalCommentDAO {
	private SqlTemplate template;
	public TotalCommentDAO(){
		template = new SqlTemplate();
	}
	public int findAll(int bookid){
		String sql="select count(commentid) from comment where book_id=?;";
		return Integer.parseInt(template.resultToObject(sql, new Object[]{bookid}).toString());
	}
}
